<?php

namespace common\models\system;

use yii\db\ActiveRecord;

/**
 * Desc 菜单
 */
class MenuModel extends ActiveRecord {

    //状态-启用
    const STATUS_ENABLE = 1;
    //状态-禁用
    const STATUS_DISABLE = 2;
    
    //类型-目录
    const TYPE_DIRECTORY = 1;
    //类型-菜单
    const TYPE_MENU = 2;
    //类型-按钮
    const TYPE_BUTTON = 3;
    
    public static $status = [
        self::STATUS_ENABLE => '启用',
        self::STATUS_DISABLE => '禁用',
    ];
    public static $type = [
        self::TYPE_DIRECTORY => '目录',
        self::TYPE_MENU => '菜单',
        self::TYPE_BUTTON => '按钮',
    ];

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%menu}}';
    }

}
